I'd be worried about the rods sliding inside the tube and getting banged up. Padding at both ends and some non-skid material down the length would help.

As for a lock, a cable lock run through the cap would do alright, but it would be easier for someone to cut the pvc than any lock. Keeping in inconspicuous would be better security, IMHO.