Alejandro Valverde sprinted to win his first stage since his leg fracture in 2017 as he took Stage 2 in Valencia and moved into the overall lead.