We can indeed use Lock instead of synchronized block. I'm not sure that using the timeout version would change much though: if a write operation takes a long time because the socket is likely to be dead, we can indeed react faster thanks to the lock timeout. What to do then? It's unlikely we can recover from the exception, so we must try to close the connection cleanly, which is likely to time out as well.
I don't understand your statement that "we can improve the time taken to perform the action within sync blocks", again, a Lock will just provide a way to react in a determinate amount of time, it won't make anything faster, especially the writing to the socket.
You have a point with the lock suggestion, but I'd like to be able to reproduce with the latest library version first, analyze what's going on, and then come up with actionable suggestions to see if we can make things better.