It will almost certainly be a metric thread. You can buy mixed packets of nuts and bolts from most DIY shops. It’s likely to be M4, M5 or M6. Use a nut to check the size of the existing bolt. Cut the new one to length if necessary. Maybe use some thread lock. You don’t want the tray and battery coming loose. I can’t seethe colour of the bolt being an issue.