Section 32310 does not apply to the sale to, lending to, transfer to, purchase by, receipt of, possession of, or importation into this state of, a large-capacity magazine by a sworn peace officer, as defined in Chapter 4.5 (commencing with Section 830) of Title 3 of Part 2, or sworn federal law enforcement officer, who is authorized to carry a firearm in the course and scope of that officer’s duties.