yeah Kc4 was better.
Endgame Help Wanted

40...a5 looks very risky, and I'm not sure what you try to achieve. If you're aiming for a draw, then 40...a6 looks safe and easy. If you're looking for more, then maybe 40...Kc4, as suggested above (but it's probably a draw too).
However, 40...a5 41.bxa5 c5 should still draw, so I wouldn't call it a blunder.
The following position arose during a speed game. I played with the black pieces, and was very short on time when I played 40...a5. Did I blunder?: