A day will come. Today, that day lies in the future. On that day, that day will be your present. When that day is the present, then you think yourself safe and happy, in the present tense.
A day will come when you think yourself safe and happy.
Your comment suggests that this isn't a conditional relationship. However, it is. We typically mark conditions with the words "if" and "unless", but "when" also has the same function.
I will come if you call
A day will come when you think those things
In the context of the original, thinking that way doesn't seem to be a sufficient cause, but it does work as a necessary condition. Unless you think that way, such a day will never come.
From the perspective of that day, thinking that way is a present-tense state.
you'll know [that] the debt is paid
We're not talking about some time in the future when you will know that the payment of the debt still lies even further in the future. By the time you reach the future of "you'll know", by the time that knowing is a present-tense state, then the payment of the debt is a present-tense fact. It is, in fact, that fact which is known.
From the perspective of that knowledge, the payment has been made.