The right of redemption does not extend to any sale under and by virtue of a power contained in any deed of trust, mortgage, or other instrument, whereby the right is waived or surrendered by such mortgage or conveyance.