What could be done on database level most certainly should be done there, considering performance.
SELECT * FROM tbl WHERE mytime >= DATE_SUB(NOW(), INTERVAL 30 MINUTE)
This will search everything that is at most 30 minutes ago and newer. Feel free to modify this query to fit your needs.