UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'oMyDfbScRqMlKHYTWqdfd8Tug7Rl4YWotXCAw+/snNw='
WHERE
key_id = '6c701b00d27bcf5c463c2c22e7a69ff8869c8be1585aa9ed2db24c32c4879531'
AND (
token = 'oMyDfbScRqMlKHYTWqdfd8Tug7Rl4YWotXCAw+/snNw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)