The Prophet ﷺ said, "Whoever performs ablution thoroughly, then prays two units of prayer without letting his mind wander during them, his previous sins will be forgiven."
حدثنا أحمد بن محمد بن حنبل حدثنا عبد الملك بن عمرو حدثنا هشام يعني ابن سعد عن زيد بن أسلم عن عطاء بن يسار
أن النبي ﷺ قال من توضأ فأحسن وضوءه ثم صلى ركعتين لا يسهو فيهما غفر له ما تقدم من ذنبه
[Its isnad is hasan]. Baghawi transmitted it in Sharh al-Sunnah, no. 1013, from Abu Dawud through the same route. It is also found in Musnad Imam Ahmad, 4/117, and Hakim graded it sahih according to the criteria of Muslim, 1/131, and Dhahabi agreed with him.