
online
time() online 20

id 2"s online_status deduction time () has been higher than 30, but id 1 does not have it, but it is still found out?

online
time() online 20

id 2"s online_status deduction time () has been higher than 30, but id 1 does not have it, but it is still found out?
DELETE FROM your_table WHERE online < NOW ()-20;
For more precise deletion, add where condition later.