UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'o3356PTdPWfg37lFbUJPvu/RES5GwibCkEoWMFr/q9Q='
WHERE
key_id = '3cc44c4224ce61941236dbc4d4bd69f3a102559fed60f3f4439398b698a4e12c'
AND (
token = 'o3356PTdPWfg37lFbUJPvu/RES5GwibCkEoWMFr/q9Q='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)