The brakes can only lockup and stay locked up if there is power to the brakes or there is a mechanical malfunction in the brakes or there is some weird design in the brake system which mechanically sets the brakes when power from the trailer is disconnected. Do the brakes release after a period of time? If the brakes remain actuated, it seems to me that either the breakaway switch is malfunctioning (possibly not completely breaking the circuit from the on board battery by the plastic connector which is connected to the breakaway cable not being fully inserted in the switch or the breakaway switch is defective. If the breakaway switch were defective and the circuit directly from the onboard battery to the brakes was energized, then how did you get the trailer home? If the brakes were energized directly from the on-board battery while towing, you would probably have burned the brakes up. I suggest that (1) check to make sure that the plastic insert is fully inserted in the breakaway switch, and if it is, then test the voltage at the point where the power to the brakes connect to the first brake assembly. There should be no power at this point when the truck is disconnected and the emergency breakaway switch has not functioned.