It's been officially confirmed that the Franklin predates Archer's Enterprise, see this article:
And if you think this is just our speculation, worry not: we got a note from Dylan Highsmith, one of the lead picture editors on STAR TREK BEYOND, about this very issue.
If you want the official explanation on the Franklin and it’s warp factor: it was a M.A.C.O. ship (or a United Earth Starfleet ship that housed M.A.C.O. personnel at times) that predates the NX-01.
When the UFP Starfleet is formed, M.A.C.O. was disbanded and the ship was reclassified as a Starfleet ship [with the USS identifier]. The ship is then “lost” in the early 2160’s.
_It was important to everyone that the ship, like Edison, predate the Federation; that thematically, the ship mirrored an earlier time in history and served as a bridge in design between then and the NX-01._
Doug [Jung] and Simon [Pegg] may have worked up something [on an official launch date], but if they did it never made it to script or screen.
Either way it predates the NX-01, and was reclassified after the UFP is formed.
The line "When the UFP Starfleet is formed, M.A.C.O. was disbanded and the ship was reclassified as a Starfleet ship" gives a basic answer to your question about why it would still be in service after 2161 despite predating Archer's Enterprise, though it doesn't address the question of why it wasn't consider the "first long-range vessel" instead of the Enterprise. Maybe just because it wasn't really intended for long-range exploration missions, even if it was capable of it? There may also be other issues that determine fitness for long-range exploration besides the cruising speed, like the efficiency of the matter/antimatter reaction needed to generate power to supply the warp nacelles, and how this relates to the distance it can travel before refueling (along with techniques for making the dilithium crystals last a long time before they need replacement, assuming the Franklin used dilithium at all).
You didn't ask this, but some fans have also wondered why it has a higher registry number, NX-326, then Archer's Enterprise, NX-01. If it was built as a M.A.C.O. ship rather than a Starfleet ship that could explain the seeming inconsistency, though Dylan Highsmith also speculates it could have been a "United Earth Starfleet ship that housed M.A.C.O. personnel at times," which would still leave us with the same problem. But in that case, this reddit thread gives a good argument involving the German tank problem for why Starfleet might choose to assign registry numbers non-sequentially--basically, if vehicles (or components inside vehicles) are numbered sequentially, then a random sample can allow an enemy to estimate total numbers, and the "countermeasures" section of the article notes one solution is non-sequential registries:
serial numbers that resist cryptanalysis can be used, most effectively by randomly choosing numbers without replacement from a list that is much larger than the number of objects produced