UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'o/U6hrc11fluCK7TeYGijU7+aeI6WKCatsiW4syqaWE='
WHERE
key_id = 'b42a5febb158c0b5aac739fef913e0fb53edf204d5eeb1511d0cab6cd06faa32'
AND (
token = 'o/U6hrc11fluCK7TeYGijU7+aeI6WKCatsiW4syqaWE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)