Mybe try buying N0174052 from any VW Group dealership, it is described as being M6 X 38mm, has a square head and is called a VW battery bolt.
Ebay seller in Greece sells them, but at a big price, if that number is still available, any VW Group dealership's parts department should be able to order a couple in for you, it is only a bolt, so you will need to retrieve the nut and reuse it.
Lots of people seem to head to Amazon for a slightly different design, but I can't say how well they fit.
Good Luck!