UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'tqBvLc5M5p2/b+wRNN/RZKewSMA7b65/QRs0PGckZsY='
WHERE
key_id = '2b8d55a01c7c01c86682390ff0613c2905130e0161fb9653922c307feb5e7664'
AND (
token = 'tqBvLc5M5p2/b+wRNN/RZKewSMA7b65/QRs0PGckZsY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)