UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'CdtT5JxUaeEmMFsZlZrPSMz3LR+ZfyLCLdyGubVPGwQ='
WHERE
key_id = '6cbb372bdf94499ad6118b31758a543d64f79420033b89c2ae8b65a102b8416f'
AND (
token = 'CdtT5JxUaeEmMFsZlZrPSMz3LR+ZfyLCLdyGubVPGwQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)