Whats wrong with this MySQL trigger? After insert I'm trying to delete rows older than 1 month. This trigger only removes the last inserted row.
CREATE TRIGGER `users_logins_delete_olds`
AFTER INSERT ON `users_logins` FOR EACH ROW
BEGIN
DELETE FROM users_logins WHERE user_id = new.user_id AND timestamp < (NOW() - INTERVAL 1 MONTH);
END