Complex sentence: Costa left Valencia by mutual consent on 21 July 2014, as his contract was due to expire in June 2015.
Split into simpler sentences: Costa left Valencia by mutual consent on 21 July 2014. His contract had been due to expire in June 2015.