The Prophet Muhammad (peace be upon him) said: "On the Day of Resurrection, I will intercede and say, 'O my Lord! Admit into Paradise (even) those who have faith equal to a mustard seed in their hearts.'" - Sahih Al-Bukhari, Volume 9, Hadith 600
"On the Day of Judgment, We shall set up scales of justice so that no one will be dealt with unjustly in any way; even if someone has an act as small as a grain of a mustard seed, We will bring it to account, and sufficient are We to settle the accounts." - The Holy Quran, 21:47
I'm asking this question because according to Quran, Allah knows what's in your heart. So if a man's heart is 90% disbelief and 10% belief and he recites Shahadah based on his 10% of belief, will Allah accept his Shahadah?
For example: Suppose a non-muslim has doubts about Islam and Muhammad's (pbuh) prophethood. He thinks Islam might not be the true religion and Muhammad (pbuh) might not be a prophet. But a small part of him believes that Islam might be the truth. So, he says "I will recite Shahadah just in case Islam is the truth". Will Allah accept his Shahadah?
If the imaan of this non-muslim is equal to a mustard seed, will Allah accept his Shahadah? Will he become a muslim?