LATCH_EX is tricky, because there are many reasons for this wait type.
A latch is a mini lock that are used by the SQL server, so it has something to do that we wait for the SQL Server to take a latch on something.
The best way to describe this "something" is that it is not a Pageiolatch or a pagelatc. It is all the rest, and that is the problem. "The rest" is a lot.
What to do
Run the following code to find the most expensive latches:
order by wait_time_ms desc
After finding them, you must start investigating, and this article are not updated with any comments on that yet, but will be in the future.