It depends on what kind of lines you have. Some brake lines are one piece, with a 'cats eye' fingertrapped in for the brake setting. Those type would need to be replaced from the toggle to the cascade.
A two piece brake line consists of one line from the cascade down to the brake setting, where there is a loop at the bottom that is the brake setting. The lower line is fingertrapped around the bottom of the that loop and goes down to the toggle. The lower brake line can easily be replaced on it's own if the upper is in good shape and in-trim.
The other issue is why your lowers are frayed. If you have exposed Velcro on your risers, that's probably the cause, and you either need to upgrade to velcroless risers (a very good idea) or at the very least, refine the way you stow and handle your brake lines so as to avoid contact with the exposed Velcro.
another tip, if you have no velcro on your riser, also check the guide ring for any damage or rust, i have seen that on a few occasion,especially on older risers that did not have Stainless steel hardware.
There could also be a couple other reasons the lines are getting damaged. In my case, it was a sharp hot knifed end of the binding tape they used for the excess stows and the fact that the grommet would jam the line very tightly against the risers when I pulled it behind my head.
The fix for both of them was to re-work the risers which moved the stow loops to the space between the toggle and the riser. No issue with this configuration.