heads up, I wouldnt use an if node (for pretty much anything that produces a visual end result)
You'll end up getting some pretty harsh artefacts in this usage case over distances, and adding a smooth falloff isn't possible.
Not familiar with unity or this node interface, but if there's a smoothstep node, try using that instead, pretty much in-place of your if nodes.
For extra optimisation i normally ignore the polynomial part of smoothstep and just use the first part of this:
x = clamp((x - edge0)/(edge1 - edge0), 0.0, 1.0);
This normally gets you pretty much a very similar visual without the extra part at the end.
What I'd do, is combine your noise textures together as you're doing, then a smoothstep where you use a single float to drive the position of the gradient, and another to control the width:
edge0 (min val) = Position - (width)
edge1 (max val) = Position + (width)
x (input) = your noise field
Benefits of doing it like this give you a super easy to adjust falloff on your beams, so if you want a nice soft bloom effect too... it just works. Normally just ramp it how you want and you can get a nice controllable lightning effect. Hardest part then becomes your noise input!
Sorry for unreal nodes, should translate pretty simply though
Small width - (0.001)
Large width - (0.025)