UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+wtX/kS4+0zzkNw0nvlQVyP3qnOHfvaJfkJBEcBYxMU='
WHERE
key_id = '6443a006232c7207b4d384875a2bb19e90c512bd0ffec2061d0879edafbf48dc'
AND (
token = '+wtX/kS4+0zzkNw0nvlQVyP3qnOHfvaJfkJBEcBYxMU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)