Late goals from Pierrick Valdivia and Jean-Philippe Gbamin earned Lens a Coupe de France quarter-final tie with Monaco after a 2-1 win at Lyon.