The current MYSQL Is
DELETE FROM `sessions` WHERE `expires` < UNIX_TIMESTAMP();
Not sure how i would make it do what i want to do. I was thinking of using php and doing unixtime-1800 and then using that in the MySQL, which would be okay for my app. Not sure if you can do it all in MySQL becuase i’m just wondering.
The PHP i had would be somthing like this
<?Php
$time = time() - 1800;
mysql_query("DELETE FROM `sessions` WHERE `expires` < $time;")
?>
Just substract the number of seconds you want
How often do you plan on running this query ?