This is a question that comes up very often. Particularly because of how expensive photography continues to be. If we all had hundreds upon hundreds of dollars we would be the best of both, right?
But, we want to be realistic about our budgets and also how strong our commitment will be in photography for the long run.
Of the two items a lens will last you far longer than a camera body. Even a good lens will probably cost you less than the camera body.
People sometimes get into the habit of upgrading all the time and always looking for the newest and greatest. That is something you want to avoid unless you are earning a lot of income from photography or just have a big budget to work with.
A good lens, taken care of properly, should last you at least a decade. The wear and tear on a good lens is fairly minimal although it does require regular upkeep.
A good camera does have a life expectancy ranging from 200,000-700,00 clicks. This of course also depends on its use and care. For a professional photographer that equals out to about 3-6 yrs.
My thoughts on buying camera bodies: " If you are looking to upgrade purchase the model two upgrades from yours."
This way you will see a vast improvement and clear benefits to the new camera.
Generally speaking new cameras on the mid range come out every year and half. High end cameras come out every other year.
Once you have taken photos long enough you will find your "favorite" lenses. These will be sharp, fast and unique to your style of photography.
Remember that it is the lens that gives the feel of your images and not your camera.