UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'OcXxToCihAeB5ZDvTxyzLCOw/85oZl4/3qc8Q8aDizc='
WHERE
key_id = '8fc75e4f45bec39e4618ada43da3462400c66b19c2a7f219b3bea820f6a3e62b'
AND (
token = 'OcXxToCihAeB5ZDvTxyzLCOw/85oZl4/3qc8Q8aDizc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)