UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '0atu6l6JqWCyqP3GKy5c4jhM+olSXy2GwwV+QUm4nKE='
WHERE
key_id = '3a54b30f5b0086c195385c332c26de419d8c6412dbeafb614a0960ab10980e58'
AND (
token = '0atu6l6JqWCyqP3GKy5c4jhM+olSXy2GwwV+QUm4nKE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)