A spouse or civil partner entitled by virtue of section 31 to a charge on an estate or interest may agree in writing that any other charge on, or interest in, that estate or interest shall rank in priority to the charge to which that spouse or civil partner is so entitled.