The data is cache data which is flushed to disk after a predetermined time period or during normal shutdown. The data protection function is used if the disk array fails, power is interrupted to the server due to hardware failure or line power interruption. You do not need to worry about the cached data if you shut down your server normally, the cached data is written to disk during the shut down.
To replace the battery, shutdown the server legally, remove the power cord from the server, use anti static procedures, remove and replace the battery module according to the raid manual.