The first number can be as low as you want. You may burn a slight amount of oil at startup when the engine components arent warm. But the lower the number the thinner it is at startup and the faster it circulates to protect your engine.

The second number should be as close to 30 as possible. 40 is passable but 30 is ideal. 50 isnt good enough unless you are tracking your car and the oil temps get hotter than that in a street car.

5W-30 is perfectly fine.