Driving in 2WD with the hubs locked will not affect your transmission because the transfer case is not engaged. If the transfer case is engaged with locked hubs, then you would be in 4WD.

Driving in 2WD with the hubs locked would affect fuel consumption (minimally), and maybe (although imperceptibly) affect handling to a small small degree. Essentaill, with locked hubs in 2WD, all that's happening is that your front axles, differential, and driveshaft are turning, but not "driving", i.e., you're front drivetrain is not producing any force to move the vehicle.