First of all instead of removing the item from the database what you should do is set up a little status flag. 0 for normal, 1 for on hold in a cart and 3 for purchased, that way You'll have permanent records of everything.
I'm not exactly sure what you're selling but what you should really have is a 'product type' table with all the descriptions and references to pictures and all that. Then if you want a product table which links a product type to a purchase.
Either way in addiont to the status flag you should also have a date_modified column. What you can do then is write a a function in php that will search for products with a status of 2 and arange it by date_modified descending.
Now at the top of your list will be the item which has been on hold the longest, you can use this information accordingly.
In addition you can store a function in the database which will run periodicly (daily, hourly, weekly, however you want) which will update the status flag back to 0 if they've been sitting there too long.
THere's a hundred thousand answers to your question. Maybe someone has something better...