Yes then can. The firstchargeholder has the first dibs on the equity after the costs of sale.
Mortgage lenders repossess and sell a property under a statutory power of sale which should be inherent in the mortgage deed you signed (there is a lot more to a mortgage deed than the one most have you sign as they refer to additional terms which are usually substantial).
This power of sale overides further charges. if it didn't there would just be stalemate for any properties where there is a second charge. The borrower could default until the cows come home if they were not allowed to sell without another party consenting.
Said other party is not going to be very keen to consent without being sure they get as much of their money back as possible and so on.....
The other charges do, of course, need to be dealt with as appropriate, with money distributed, if there is any left, after the initial chargeholder has been paid. Obviously if there is money left over then the further chargeholders would be contacted for a redemption figure.
The Land Registry will automatically remove further charges on receipt of the signed TR2 (transfer used when exercising a power of sale), however, some additional restrictions may need to be dealt with to be removed and these often relate to other secured debts such as charging orders.
This is the usual case, not allowing for quirks or some lenders such as private ones who could have all kinds of documentation in place.
It is the peril of any further chargeholder to take any such charge without making sure there is sufficient equity (bearing in mind things like early redemption penalties which can be substantial) and preferably a cap on further borrowing on any charge which ranks in priority to theirs etc...
Does that make sense?