Q.What Is Life Expectency Of Barberry Shrub?
also, my barberry has a lot of moss and lichen – time to replace?

Certified GKH Gardening Expert
Their lifespan is around 15 to 20 years or so. Usually, the lichens are not harming the tree, but they are a sign that the tree is suffering from something else. This can be old age, or infection. If the shrub is around the age of 20 years, then it may be on its way out.
As long as the small tree did not die from disease, it will be safe to plant again.
This article will help you to care for these plants: https://www.gardeningknowhow.com/ornamental/shrubs/barberry/barberry-shrub-care-tips.htm