All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad, sallallaahu ‘alayhi wa sallam, is His Slave and Messenger.
There is no contradiction between what is said in the supplication of Qunoot which was stated by the Messenger of Allaah, sallallaahu ‘alayhi wa sallam, that (Indeed he whom You Take as an ally is not humbled) and the afflictions which befell the prophets of Allaah The Exalted, to the extent that sometimes they were killed by the people to whom they were sent, and the Jews topped such people. Allaah The Exalted Says about the Jews (what means): {But is it [not] that every time a messenger came to you, [O Children of Israel], with what your souls did not desire, you were arrogant? And a party [of messengers] you denied and another party you killed.} [Quran 2:87]
Humiliation in this Hadeeth means humiliation in the Hereafter. Al-Mubaarakfoori said, “Ibn Hajar said, ‘This phrase means that those whom You Take as allies among Your slaves will not be humiliated forever or in the Hereafter; even if they are tested, some people were instigated against them and apparently disgraced them (in the worldly life). Honoring them in the Hereafter is the apex of eminence and esteem in the sight of Allaah and His close servants. Therefore they, may Allaah exalt their mention, suffered from the amazing tests which became famous incidents.”
Allaah The Almighty guaranteed the protection of His Prophet Muhammad from the harms which lead to death so that he could convey the message. However, Allaah The Exalted Did not Promise His Prophet to Grant him an eternal life in this world.
The poison which the Jewish woman put in the sheep did not affect him at that time. He led the armies after this incident, negotiated with the enemies, triumphed in many battles and led a normal life for more than four years.
Allaah Knows best.