“Though a sinner does evil a hundred times, and his days are prolonged, yet I surely know that it will be well with those who fear God, who fear before him. Ecc 8:12
The thirty-third chapter of Ezekiel lays out the criteria for forgiveness and right relationship with God. If a man is faithful to God until the end of his life and then turns away, all of his previous righteousness bears no weight. On the other hand if a man is unfaithful and rebellious to God until the end of his life and then turns toward God, all of his unrighteousness bears no weight against him.
We are not storing up points to earn salvation or squandering points to loose salvation. If we repent, God is faithful to forgive us (1 John 1:9). He will bring everything into the counsel of his will on our behalf as we rely on him regardless of the stage of our lives (Ephesians 2:11).