Green had been rested for the previous two matches after an ankle injury but opened the scoring in the 31st minute.
Mark Randall played the ball out to Lee Croft and his cross from the right was volleyed home by Green.
The home side equalised five minutes later when striker Richard Logan got in front of his defender to stab a left-wing cross past Stephen Bywater.
Steven Davies came on for the Rams at half-time and scored in the 51st minute when he turned inside the area and drove in low.
Davies then crossed from the right for Green to slide his second into the corner and complete the scoring.