Normally, you shouldn't run bulbs and ballasts unless they are matched, but I know from experience you can run 430/400 watt bulbs pretty interchangeably but that's a difference of less than 10% (30/430w = 6.9% or 30/400w = 7.5%) whereas you are doing (40/320 = 12.38% or 40/360 = 11.11%).
Technically the margin is still pretty small, although its twice as large as what is normally recommended. I would say you will probably be able to run the bulb as you want, and if anything, you might just notice some early pitting and pre-mature bulb failure.