The velocity is the sum of the completed behaviours (or stories, if that's how you count it).
If they genuinely completed 30 points worth of stories, but during their work they created new stories worth 9 points, then the velocity is 30. However if they completed no stories and in fact got 70% of the way through 39 points worth of stories, then their velocity is 0.
And if they completed 22 points and the remaining 8 point story is now estimated as a 17 points story, then their velocity is 22.
Fractionally-complete stories do not count towards velocity. Not even a little bit.
Work spent doing an incomplete task counts not at all when calculating velocity. I know it sounds unfair, but this is the way it is. And it works. All that matters when calculating velocity is that the dev team has completely and utterly finished with the task. It's tested, it's in CI, the automated delivery system has its grubby little SSD wrapped around the software. Anything short of that does not count towards your velocity. If you count work done instead of behaviours released, then you are doing yourself and your customers a disservice. Don't forget that the 99% completed story from this iteration, which counts 0 towards your velocity, will be in the next iteration and will count towards its velocity. It all evens out in the end.
It's fine to re-estimate, or to create a new story from the existing one. But do not retrospectively change the points earned in the sprint. It does not help the team or the company achieve anything extra, it only inflates the team's confidence in themselves. Velocity, like all metrics, is a gross reduction of performance and it cannot be used to justify recent results. At best it can be used to encourage future endeavours.