When Marvel sold the live action rights to many of their characters and groups of characters in the 1990's, it was on the condition that the rights would revert back to Marvel if the properties were not used within a certain number of years.
This condition has led to the rights for various characters reverting to Marvel since, the latest and most well-known being the rights to the character of Daredevil after 20th Century Fox failed to do anything with the rights since the 2005 Elektra movie, which has resulted in Marvel Studios successfully creating the Netflix exclusive Daredevil series as part of the Marvel Cinematic Universe.
As such, we can conclude that X amount of years will have to pass without 20th Century Fox creating an X-Men-related property before mutants can appear in the Marvel Cinematic Universe. Unfortunately, as far as I am aware no one who is not privy to the details of the rights and licensing contract between 20th Century Fox and Marvel Studios knows the exact timeframe required to pass before the rights naturally revert.
If the deal for X-Men was the same as the deal for Daredevil (whose rights reverted towards the end of 2012, 7 years after they were last used by 20th Century Fox in Elektra) then we can say, at least for now, that the rights will probably not revert until ~7 years after 20th Century Fox stop using them, which at the time of writing means 2023 at the earliest, 7 years after the release of the 2016 X-Men: Apocalypse film. However, we can be fairly certain that more X-Men films will be made after that, with a third Wolverine film already in the works.
However, a recent deal between Marvel Studios and Sony Pictures (who own the live action rights to Spider-Man) has resulted in Spider-Man becoming a part of the Marvel Cinematic Universe in the upcoming Captain America: Civil War. Although the rights to the character still belong to Sony Pictures, the deal means that each studio can use characters and events from the others films in order to bolster their own films, so we can expect to see Spider-Man appear in future Marvel Cinematic Universe films, and the upcoming Spider-Man films to reference events from the Marvel Cinematic Universe and potentially use character from other films.
Despite this deal giving many people hope that we will soon see mutants in the Marvel Cinematic Universe, the fact that the X-Men movies have been more successful for 20th Century Fox than the recent Spider-Man movies have been for Sony Pictures means that the studio is under no financial pressure to make a deal. As such, as far as we as the general public are aware, there are no plans (despite it being possible) to introduce mutants into the Marvel Cinematic Universe, which has resulted in Marvel Studios attempting to use their Inhumans property as a mutant substitute for now.
It is also worth mentioning that the inclusion of Quicksilver and the Scarlet Witch in Avengers: Age of Ultron is not indicative of a 20th Century Fox/ Marvel Studios deal - these characters were mutants first and Avengers second, meaning that both studios own the rights to the character and can use them as they see fit as long as Marvel Studios don't reference mutants and 20th Century Fox don't mention The Avengers. This has led to the potentially confusing situation where two different versions of the same character have appeared in two unrelated films (Quicksilver in both Avengers: Age of Ultron and X-Men: Days of Future Past).