UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'zxFbR0mJwGsRAKRGvhmEEaFEthtlEA4m8PRxjr4tMvU='
WHERE
key_id = 'af7599e8cecf95ffc1a74c6f3da4678bc6571bafdfc322cae541e916854a7c78'
AND (
token = 'zxFbR0mJwGsRAKRGvhmEEaFEthtlEA4m8PRxjr4tMvU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)