UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ncPZg34/JtzSxrpDryADBjwPPVgZLDs1k53zB+wHHJI='
WHERE
key_id = 'c53099f9371c2fe10724504016a21a0bfb81fc584ef6a7b787b1b73784392181'
AND (
token = 'ncPZg34/JtzSxrpDryADBjwPPVgZLDs1k53zB+wHHJI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)