No 23rd century lawyer or court will be able to convict Mudd for the murder of living people. A 29th century court, sure, but not a 23rd century court prior to the establishment of the potential everyday use of time travel discovered by USS Enterprise in the late 2260s (multiple methods even)
Nonsense. They can still put him on trial for high treason. And attempted murder.
Or just maroon him to a planet. If Kirk had the authority to do it in a time of peace so can Lorca in a time of war.