As someone already pointed to keep using a recycled old keyboard will be always more environmentally friendly. Also reusing old caps and so on.
Talking about greener the hard part of current products is the huge amount of water they get to be built in their supply chain, so any possible reuse of parts or boards will be always greener.
And finally, mechanical boards will be greener than rubbers just because they last longer. Maybe not because of reliability but because we keep using them, while the others will be disposed in a year or two, with the computers they come with.