UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'M82efE1FXAhMNz2CH6os/kWNFk7vQIVxqO1g6FB8CLw='
WHERE
key_id = '7964dfe24accdea3e8fd8d6384ead4e315862fd3a176ba993bbc1080988102ae'
AND (
token = 'M82efE1FXAhMNz2CH6os/kWNFk7vQIVxqO1g6FB8CLw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)