UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Sc5eL1FPUTryD6kgL2lZfcMJjsZjn+o2T+9VgeS++oQ='
WHERE
key_id = 'e774d8784ff1dd69f733ccff6c8c36bd7b0920ac64c7cf9bd88a0872ac829441'
AND (
token = 'Sc5eL1FPUTryD6kgL2lZfcMJjsZjn+o2T+9VgeS++oQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)