"Except for those who believed and did righteous deeds." He made an exception for those who believed. "And for them is a reward," meaning:
﴿إِلا الَّذِينَ آمَنُوا وَعَمِلُوا الصَّالِحَاتِ﴾ اسْتَثْنَى مَنْ آمَنَ ﴿فَلَهُمْ أَجْرٌ﴾ أَي: