UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '5vL/8yM5aD1Bd5/nNmVQPTLIEqQ5jnoZqdfOSWa6hoY='
WHERE
key_id = 'f2b7c35ca81f97ac49d0c30ba2a6dc6dadc7377b493f573fe8ce97297dc7b886'
AND (
token = '5vL/8yM5aD1Bd5/nNmVQPTLIEqQ5jnoZqdfOSWa6hoY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)