It could, but you can also check right before proceeding to the checkout and confirm.
You could also put a lock on items when it gets added to a cart. This would be a time based lock, but you would have to figure out how to implement this on your own.