It is narrated from Abu Na'amah (may Allah have mercy on him) with the same chain and meaning, and in it the Prophet (peace and blessings be upon him) said: "When one of you comes to the mosque, let him look at his shoes; if there is filth on them, let him remove it and pray in them."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 4250