UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'zlWp/KuhUENfZiiaDefwiwtrPVk3lzhf+rYOHXUuZNc='
WHERE
key_id = '70d1220d4dd9e4d7ba6d3047ccefce1290aceb083f0a742f98052526fe1581f9'
AND (
token = 'zlWp/KuhUENfZiiaDefwiwtrPVk3lzhf+rYOHXUuZNc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)