Nutty food questions haha!?!
Answers:
Cashews can definitely get stale, and I wouldn't recommend eating food that you found in a barn. That said, I wonder if this can of cashews is really one of those old practical joke cans of nuts and, if you opened it, all these springy, fabric-covered "snakes" would pop out! (However, I would guess you're probably too young to know what those were!).
Just check the expiration date on the can. If it's before the date, then make your decision if you should try it. Also, if the can is still sealed, it should be safe.
if the date is good and the can is not opened or damaged it should not be "moldy".
I would not eat food that if I did not know where it came from. Just me.
If they were sealed they are probably not moldy but its best not to eat them.
If the can was never opened they would probably be safe. You'd see mold if they were moldy.
As long as they were unopened they would be safe to eat.