UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'JeUxDYH/oikaBnv0RL4woRuVmwlw/YR6xXhZm7JE2tA='
WHERE
key_id = 'c3e5f9d31ff79272032dfcd504bd09ddd3d255bb87930b18301e6d4184698c7e'
AND (
token = 'JeUxDYH/oikaBnv0RL4woRuVmwlw/YR6xXhZm7JE2tA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)