Fan sizes are total dimensions, so a 40mm is 40mm x 40mm side to side (of the entire fan casing)
The big problem with fans is the smaller the fan, the faster it has to spin and will create a higher pitch sound, so swapping a 40 or 50mm for the same size will still be quite noisy
Could you...