To win the home at the sale you will need to pay far more than $20K; you will need to pay at least the amount of the judgment, $117K, as the first mortgage lender/judgment holder will be entitled to a credit bid for this amount.
I recommend you take a step back and consider retaining one of my colleagues who practices in your area. You might miss an auction or two, but you will have the peace of mind of having all lien issues spelled out for you so that you can make an informed business decision. Good luck.
Typically, the first priority mortgagee will also bid on the property, potentially up to the amount of their lien or at least until fair market value. Even if you do get lucky with a $20K winning bid, there remains some possibility that your purchase could be set aside by the court for inadequacy of the prevailing bid. If the bid is grossly inadequate in relation to the value of the property, courts have been able to set aside the foreclosure sale.
The first mortgagee could sue the previous owner for the deficiency amount between what they collect from the auction, if it is not the winning bidder, and the judgment amount of $117k. Like my colleague stated, it is unlikely that a winning bid would be in the amount of $20k since the lender will likely bid up to its judgment amount of $117k.
As for the second mortgage, that would be wiped out assuming the lender was properly named as a Defendant in the lawsuit.
It is extremely unlikely that a successful bid will be anywhere in the vicinity of $20k. The plaintiff normally bids up to the amount it feels it is willing to be outbid for, up to a max of the total judgment amount. If the judgment is $117k, it is highly unlikely the plaintiff would stop bidding anywhere near $20k.
However to answer your question, the plaintiff will receive the bid proceeds up to the judgment amount. If there is anything more than that resulting, it is paid to the junior lienholders if any, and if not, to the property owner. The foreclosure sale extinguishes the foreclosure mortgage. The HOA obligations whatever they are and the taxes do remain.
Please note that the above is not intended as legal advice, it is for educational purposes only. No attorney-client relationship is created or is intended to be created hereby. You should contact a local attorney to discuss and to obtain legal advice.