let them both put it in their basket, and show number of available items,just let the one who checks in faster buy the stuff and tell the next one the item is not available.