How does Contingency with Cure Wounds work with incoming damage?

If a bard selects contingency as a magical secrets pick, and casts a 5th level cure wounds with the trigger “when I drop to 1 hitpoint”, how does the incoming damage work?

Say he is at 5 hit points. Then he gets hit with 30 damage. Does the extra 25 damage take away from the 5th level cure wounds that gets triggered?