i5 3570k + noctua NH-D15 = 40 degrees idle?

I've got an i5-3570K and as above my idle is ~10 DegC above ambient so usually at around 33 DegC, mid 40s gaming and 50 DeC using Prime95 with turbo set to 4.2 GHz.

So yours is a little higher but nothing that causes particular concern. My cooler is the horizontal Noctua tower which is similar but with a bit less cooling capacity. My case is a HAF XB case which mounts everything horizontally and I've spent a fair amount of time getting the air-flow just right. Plus my 980 Ti has an AIO water cooler so all the hot air is dumped externally. Ambient temps in the case are usually pretty similar to the room.

Maybe you can play with the airflow in your case too by moving fans or changing flow directions.