Once a compostela is issued, the credentia is stamped at the end and the start of the sellos, and that credentia cannot be used again to achieve a compostela. The credentia accepted as valid is stamped with the image of the saint: the credentia not accepted as valid for a compostela is stamped with an image of the cathedral to show the pilgrim has visited the cathedral, and the office is happy to issue a letter, in Latin, saying the pilgrim has visited the cathedral. This is popular with non religious people who have walked a Camino.
My thoughts are that the staff in the pilgrim office are wise in the ways of the world, and have seen just about everything.
It's possible someone walked 40k: I've issued compostelas to people who have. But if they are in their seventies, don't have enough stamps, and 40 kilos overweight, eyebrows will be raised. If they are in their twenties and as thin as a stick and have all the right stamps in the right order, that's different.
On balance, there's a reason the office behaved as they did. It's probably a good reason.
Finally: no, there is no way to change the decision. I suggest the pilgrim in question frames the credentia, hangs it on the wall, and stares at it longingly, dreaming of those halcyon days.
This is what I do.