Spices--if you can't smell them, you can't taste them. But they don't go bad. Just useless.
Now, baking powder, I think I'd throw it out if it has expired. I think it'll lose it effectiveness, but not sure if it actually goes bad. It's good that you bought fresh after 5 years. Ha.