I am not familiar with the M3 but if it is happening while not charging, it could be a fan for heating/cooling the battery like in the MS. Just had both of mine replaced for noises while charging/sitting.
Most EVs (other than the Leaf) including Models S/X/3 use some form of active battery thermal management which will run pumps and fans even when the car is off and not charging, if the battery temp is out of an acceptable range. That sounds like a fan, but it sounds a bit like a fan with something stuck in it. If it continues to sound like that, I'd take it in. If it stops, maybe it just got a leaf in it.
So today when I went to the car, it was completely silent. Then I opened up the app for it to 'wake up', as soon as it woke up, the noise started again and it seems to stay on the whole time the car is 'awake'.
Update: sounds like they noticed a valve making more noise than expected, so they replaced the superbottle for the coolant system and they said the noise has gone away. I haven't picked up the car yet but was glad to hear that.