Currently I'm level 39 and I have finished the main story, HoS expansion and all the witcher contracts. My question is where do I go to quest, kill monsters to get to lvl40 and beyond so I can use the Black unicorn sword.
You have three options
Grind and explore, very slow, even if you happen upon another new quest.
Start a newgame+, which scales everything up to your level, allows you to play everything again.
Wait for the Blood & Wine expansion (will be released in summer, current rumors say 7th of June), which will certainly provide additional content to get past lvl 40.
Personally, I went with option 3, my character is currently Level 39 as well.