UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/ZeRvF84bnwjoO2ZxCqsh9lU+N6SbL9bldPfH8AqcVs='
WHERE
key_id = '7a153d29dbe94ac97becd256388e272b7145c34fef6a91e81e84e2e55e154711'
AND (
token = '/ZeRvF84bnwjoO2ZxCqsh9lU+N6SbL9bldPfH8AqcVs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)