UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'yKwj7dyG0P2ACNKd+TkKat0qakklweaTKXK4sl7hXVs='
WHERE
key_id = '65101a585b4d5aa5997c5b186fbcb2e6f9ee5abe20f5e75cc444c173005751c1'
AND (
token = 'yKwj7dyG0P2ACNKd+TkKat0qakklweaTKXK4sl7hXVs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)