When you bid at the Trustee’s sale, you are buying the lenders position in cash. So if you buy the property from the second, there is no second lien anymore, just you owning the property subj. to the first. The highest bid for the second wins.
You can’t bid lower than the opening bid set by the lender. I have heard that they are starting to set the opening bids at an amount lower than the amount they are owed. I think these are somewhat rare at this point.