The taking of a promissory note or other written obligation to pay any indebtedness for which a lien is given by this chapter shall not discharge such lien unless the obligation by its terms shall so provide, or the time for payment be thereby extended beyond the date fixed by law for enforcing the lien.