Lock in

To make something (such as a rate of interest at a bank) permanent over a period of time.

We locked in the mortgage of our house for five years because the interest rates were low.