No, you can't. If you take a TA backup, unlock bootloader, flash CWM and then relock the bootloader with the backup you took earlier your phone will be soft bricked until you flash stock kernel again. The reason is that with locked bootloader, only kernels oficially signed by Sony can be booted, if you relock the bootloader while you have CWM the phone will refuse to boot because it'll see you're using CWM, not a signed kernel from Sony...
Sony Xperia M dual [C2004]
ROM: 15.5.A.1.5 (stock)
Android version: 4.3 (rooted)
Bootloader: locked (unlockable)