It might be easiest to just do this on the top of the insert page or a page that displays the records.
The other option would be to create a separate page to do the deletes and set up a cron jon on the server. The former would be preferable.
It is easier to manage and would be less prone to error. If you had a cron that ran every hour and deleted any records over an hour old... then hypothetically a record could exist for an hour and 59 minutes before being actually deleted.
If the delete happened on the top of the page that displayed or used the records then the page would always be up to date by the time it was displayed even though records could remain for much longer when the page isn't accessed.