UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'b/bFdMQO7EaD8bT7ECcOfUtld3JcH4DKogrhN9zc0Xw='
WHERE
key_id = '5fb4a78fc4b5d358068088f233cefcc590c8bc15068f0eceb51b89b1fc264419'
AND (
token = 'b/bFdMQO7EaD8bT7ECcOfUtld3JcH4DKogrhN9zc0Xw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)