I am not a solicitor, but this is my understanding.
House sold for €100,000
First mortgage: €80,000
Judgment mortgage: €10,000
The judgment mortgage gets paid in full.
House worth €80,000
First mortgage €100,000
The judgment mortgage is of no significance. It doesn't get paid. And I presume it can't stop the sale of the property.
The debtor still owes the creditor the €10,000 , it's just that they no longer have any security for it.