Each time you script goes to enter another person into the file it goes through and checks each time and deletes any entry that is over say 10 mins. Or you can use CRON to check run your file to check for old entries every so often.