UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'L81mthSpoZsO5lKyDDSLACun2mPhiCIYuECGWuAxwX0='
WHERE
key_id = 'db42eaa8d607508edb12a8a0c58bdb96da4122194e96334a9b915c288606a9e6'
AND (
token = 'L81mthSpoZsO5lKyDDSLACun2mPhiCIYuECGWuAxwX0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)