Použijte tento dotaz SQL: select * from myTable where Login_time > date_sub(now(), interval 3 minute) ;