As the TV only has HDMI 2.0 ports, I am considering to buy a thunderbolt to HDMI 2.0 adapter. but I want to know that whether this combination will give me the 60Hz refresh rate at 4k resolution.
No, while the LG 40UB800T TV claims that it can run at up to 100Hz as a TV. It does so through internal interpolation which adds latency and is unsuitable as a computer display.
When you run this LG TV as a computer monitor you will only be able to get 30Hz out of it at full UHD (3840x2160) resolution across an HDMI cable. To drive the LG display at UHD@60Hz you need HDMI2.0 with HDCP2.2 support.
Apple does NOT support the HDMI2.0 or HDCP2.2 standard at this time. As of late 2015 the HDMI connector from ANY Mac will only drive a UHD display at 30Hz max according to Apple. To drive a UHD or true 4K (4096x2400) displays at 60Hz (with full color resolution) you MUST use DisplayPort with a monitor that supports 60Hz.