Adding an item to the cart does not lock the item in the database. This means that someone else can buy the item if they are faster than you. Even if one of the items in the cart has been sold out during this time frame, it blocks the entire transaction and other available items can’t be bought. The app does not notify the specific item that has been sold out, so the only way is to empty the cart, force quit the application (it doesn’t update stock count automatically) and add the items again.
I understand that locking an item will create its own problems but limiting this period may help. For example up to 3 minutes which can begin the countdown after the first item has been added. This lock may be a scoped to the cart instead of an item and the countdown may be shown near the cart icon if there are any items in the cart.