UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'uL99oQ7jXUOoWm7ViIQ+Iv2rYi1+qnLyiYnpKO/GrrM='
WHERE
key_id = '68f73b303e3040b1f6c68f6aaa0cbc6ee8887d82100f5e5ae85016ab3e1167a9'
AND (
token = 'uL99oQ7jXUOoWm7ViIQ+Iv2rYi1+qnLyiYnpKO/GrrM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)