UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'vMwAsPmbCetx2DiKk6qqGEL+kaXmEuekqQ2OiVU7gVk='
WHERE
key_id = '06cd869d0f856294514c2d278659cdadee4364db296b7d998713cf496a168215'
AND (
token = 'vMwAsPmbCetx2DiKk6qqGEL+kaXmEuekqQ2OiVU7gVk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)