Praise be to Allaah.
Yes, he can stop his prayer and kill the snake or scorpion, because the Prophet (peace and blessings of Allaah be upon him) said: “Kill the two black ones during prayer, the snake and the scorpion.”
(Narrated by the authors of Sunan and classed as saheeh by Ibn Hibbaan).
If you can kill it whilst still praying, without moving more than what is regarded as acceptable, then this is OK and the prayer is still valid.
And Allaah is the source of strength. May Allaah bless our Prophet Muhammad and his family and companions, and grant them peace.