UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'NHJ4wGsufLHR31FPQLu36Dd1RX0fnFKfuEqMq4mJKEY='
WHERE
key_id = '75be28c6b4e3a5ea8a80140095f731941d39e6b720f1bdd37caeb0129363dae6'
AND (
token = 'NHJ4wGsufLHR31FPQLu36Dd1RX0fnFKfuEqMq4mJKEY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)