The 27-year-old is believed to be a summer target for both Barcelona and Los Blancos, who are expected to lose goalkeepers at the end of the season.
However, the Spaniard, who moved to Espanyol from Madrid in 2008, has revealed that he wants to sign a new long-term deal at his current club.
"That possibility isn't a given and it would be stupid to think about it now. I've always said I'm an Espanyol player and I have a year of my contract left," he told reporters at a press conference.
"It's not up to me if the club wants to sell me or not, but I have to keep doing well and I'm only thinking about our next game against Betis.
"I'm about to renew my contract and nothing more. It's something we've been discussing for a while and everything will be sorted out. There's been a lot of cup games and the club has also been occupied with the winter market."
Casilla is widely regarded as one of the best stoppers in La Liga.