How to get rid of from overbooking car rental website

I have a car rent site where people can book a car for their needs,but problem is my vehicles are limited so after booking a car i want to show an alert for the next 1 hour as it is overbooked immediately to my customers as no one can book it again within next 1 hour. Here is my approach-

  • fetching only today’s booking info
  • checking every vehicle is it booked or not
  • if it is booked then count the booking time and current time and compare them is it equal to or less then 1 hour.
  • if it returns true then show the alert

now problem is how can I remove this MSG after 1 hour?

any code example would be highly appreciated. Thanks