user-svc/sql/schema/token/delete_expired_tokens.sql

4 lines
116 B
SQL

DELETE FROM token
where
TIMESTAMPDIFF(DAY, NOW(), last_updated) > ? AND
TIMESTAMPDIFF(DAY, NOW(), time_created) > ?