Rey Mysterio’s surprise appearance at the Royal Rumble was a one time appearance for now, according to PWInsider, and it was only done in the past week and was largely kept a secret. Mysterio has not signed a new WWE deal, but he looked great, both in terms of his physical appearance and in the ring, so it’s definitely possible that WWE could offer him a full time deal (if he’s interested).
Mysterio appeared at #27 in the Royal Rumble match to a huge pop. He was able to last until the final five along with Finn Balor, Shinsuke Nakamura, John Cena and Roman Reigns, before being eliminated by Finn Balor (after Mysterio hit a double 619 on Cena and Reigns, delighting the crowd).
Mysterio has been in negotiations with both WWE and Impact since this summer, but all of the negotiations have fell through up until this point. Most recently, Impact was very close to signing Mysterio to a deal earlier this month, but that fell through and the role Mysterio would have been given in Impact was given to Austin Aries instead.