The problem is of course the database access on the 'add to basket' request.
Customers will add stuff to their basket all the time, they aren't always going to be buying that item. Plus at times of high load, say in a sale, even large ecommerce sites simply don't have the processing power to have 'add to basket' requests processed on the server side.
If you want a scalable e-commerce site, you need to push all the processing you can to the client. 'Add to basket' should be a purely client side operation and not update the stock level.
You can check the stock levels during the purchase process if you like, which will require server side processing in anycase. But I believe the current best practice in e-commerce is not to check stock levels until you actually try and fulfill the order in the warehouse.
If the order can't proceed at this point then you can email the customer and tell them their order is delayed while new stock is delivered or cancelled.
This maximises your income, as customers are usually happy to wait a bit longer rather than cancelling the order, but if they see 'out of stock' on the website, they will not place that order.
Furthermore you can assess the demand for the item in question and order more from your supplier if required.