UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'OJVzUO+QePfTpezdniRjsaxIFWAKZjU8afLJR71L6NM='
WHERE
key_id = '68c2a38f80e90c9bbb401f329052577bb38b69762d69c83d6eb0924a1fe16d6f'
AND (
token = 'OJVzUO+QePfTpezdniRjsaxIFWAKZjU8afLJR71L6NM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)