Employee was replacing packing and thought the piece of equipment was turned off, the equipment cycled and pulled his left hand, pinching it between the inside casing and the actuator. The equipment had been locked out, but the employee unlocked the equipment to test it, then failed to relock.