Unless the database is updated to indicate the product is in someone's cart, I'd just let the session time out and not worry about it.
The only other way would be to add a counter to indicate the number of each product in people's carts and update them as transactions completer or are abandoned.
Check out X-Cart.
Shopping Cart Software & Ecommerce Solutions: X-Cart. Free shopping cart trial is available.