UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '2Uaxo8O27Fhkq2qMDA/rjBEksOeetnDjOVlgwRvl/Z4='
WHERE
key_id = '46a409bfb7dfa9ad0f0eb9b142709e04979a63becc0e9445c554c59ee992aea4'
AND (
token = '2Uaxo8O27Fhkq2qMDA/rjBEksOeetnDjOVlgwRvl/Z4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)