UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '0a3tdufuF4Sv0HWaTIX07yIvE9NK7nizjamgtJ8p0t8='
WHERE
key_id = '4cc05c518ce26f3a03bcc1ee726082c7ba6b339f4ff92b1716107983debc0e4d'
AND (
token = '0a3tdufuF4Sv0HWaTIX07yIvE9NK7nizjamgtJ8p0t8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)