UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'MvlqArTUf25+CSvINchvfC/HoaDBl1qxDgYgPYLwfzE='
WHERE
key_id = '71e85e1c0ef9ac84f479edd9ef1ff9dbf7a847105c4c29d9666d590b5ac76372'
AND (
token = 'MvlqArTUf25+CSvINchvfC/HoaDBl1qxDgYgPYLwfzE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)