Sorry I didn't include enough detail in my first post. I'm using CGI::Session and I have my sessions expire set at 30 minutes:
$session->expire('+30m')
My problem is that my MySQL database keeps filling up with sessions that I want to delete after they are expired. I was thinking about parsing the epoc out of the a_session field, but I am looking for a more elegant way to clean the expired sessions out of the database.
I see. I haven't used CGI::Session before, but perhaps you could use a combination of $session->atime, $session->expire, localtime, and $session->delete to get something like this pseudo-code:
$session->delete if (($session->atime + $session->expire) < localtime)
+;