"And whoever repents and does righteousness, then indeed, he turns to Allah with [proper] repentance," meaning: He accepts his repentance if he repents before death.
Surat al-Furqan (from verse 72 to verse 77).