select from_unixtime(`your_timestamp`) as lastdt from `sessions` WHERE from_unixtime(`your_timestamp`) >= NOW() - INTERVAL 15 MINUTE ORDER BY your_timestamp DESC;