UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+926a1Sw256XqPrVgbEGEpaEfRnwQy+7fRiTgpwFQPk='
WHERE
key_id = '018347aeada327da35af92e4437b83de4e1f4e5acece53ebc6ee94354926d620'
AND (
token = '+926a1Sw256XqPrVgbEGEpaEfRnwQy+7fRiTgpwFQPk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)