If we are talking about DJI inteligent battery they are automatically discharged to 60 or 65% after not used for more than 10 days, so from that point of view year old battery will be absolutely fine if it was not defective from factory.
From what I have read if the batteries are stored for a very long time the cells can get damaged when charged and would not balance out, I suggest you test them first before buying them. put it on charge and check out the cells in the go4 app, by the way what are you paying for the 2nd hand batteries?
You can insert the battery on the drone and connect the app to see if there is an error code about the battery. If there is no error message, no worries.
The battery life is 200 charging cycles, if more than 200 charging cycles or there are error codes or damages, please don't continue using it.
For the battery maintenance, you can refer to the tutorial below.