عَن أبي بكرةَ أَنَّ رَجُلًا قَالَ: يَا رَسُولَ اللَّهِ أَيُّ النَّاسِ خيرٌ؟ قَالَ: «مَن طالَ عمُرُه وحسُنَ عَمَلُهُ» . قَالَ: فَأَيُّ النَّاسِ شَرٌّ؟ قَالَ: «مَنْ طَالَ عُمُرُهُ وَسَاءَ عَمَلُهُ» . رَوَاهُ أَحْمَدُ وَالتِّرْمِذِيُّ والدارمي
It is narrated from Abu Bakrah (may Allah be pleased with him) that a man asked, "O Messenger of Allah! Which person is the best?" He (peace and blessings of Allah be upon him) replied: "The one whose life is long and whose deeds are good (i.e., according to the Qur'an and Sunnah)." The man asked, "Who is the worst person?" He (peace and blessings of Allah be upon him) replied: "The one whose life is long and whose deeds are bad." Chain is weak, narrated by Ahmad and al-Darimi.