One solution is to add two columns to the table in the database. One column is the session identifier or user identifier, or any user to whom the room is offered. The second column is a timestamp indicating when this offer will expire.
Then, only those rooms that have an expired timestamp in the hold column are displayed in your application. (Set the initial timestamp to 0 so that it starts.) When a room is selected, check the column again. If there is an expected timestamp, the user receives a message "sorry, you were too slow." Otherwise, put there a 15-minute time stamp in the future or something else, and continue.
You often see this on ticketing sites and sites that say something like, βWe hold these places for you for another 14 minutes. Please complete the transaction by then or it will be released blah blah blah.β
source share