UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ppQ2NugsVUrwADW4TSpwIg8zOlFRXsKHOp3sMiZMMk0='
WHERE
key_id = '329a19de4cf402568eb13ec35e0ef639f66262e5c018c166c27c9fd89d4542d9'
AND (
token = 'ppQ2NugsVUrwADW4TSpwIg8zOlFRXsKHOp3sMiZMMk0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)