UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'YaxEIf4hVR1+Ugh6DANGdKQwWCTsgwuAFbWPwKPQUFo='
WHERE
key_id = 'f1135bcc4a221a6798e9124b7a39f44bf3490d2d59723cb83f071a6bb9428b2c'
AND (
token = 'YaxEIf4hVR1+Ugh6DANGdKQwWCTsgwuAFbWPwKPQUFo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)