Prophet Jonah - 10:91 Too late! You had rebelled before and were among the transgressors.
Ruling on believing at the time of death:
The Women/4:18 "The repentance of those who do evil continually and when death overtakes them say, "I have repented"is invalid. And the repentance of those who die as disbelievers is void. For them is a painful torment."

The Family Of Imran/3:90 The repentance of those who disbelieved after their belief and went further in their disbelief will not be accepted; they have gone astray.