If you are not planning on eating the walnuts that you get from the store right away, it is highly recommended that you refrigerate or freeze them. When kept in the refrigerator, walnuts can last much longer than in a bag on the kitchen counter. Those who put their walnuts in the fridge or freezer will need to make sure that they seal them properly though.
Make sure that you have your walnuts in a vacuum-sealed container so that no air is able to get in. When you do this you will be able to keep your walnuts from going bad for a long time so you can take them out and eat them when you want.