I've been playing piano for 7 years, and taking lessons. Piano lessons really help with the theory, but once you have that decent knoweledge, just listen to some songs with keyboard riffs and try to play them. Do them in sets of 5, each set going a little bit faster than the last, until you can play REALLY fast. Also some pop-punk songs can just be played on the keyboard, practicing that can help your play-by-ear skill. Like most green day, blink-182, fallout boy, etc.
A lot of people don't like pop-punk, but really it's just pop-punk songs that can help you in that area.
Also playing jazz piano can help with the riffs a lot, try and make up your own fast jazzy riffs on the blues scale, if you practice that alot than you'll be able to do good riffs.
Other than that, just keep taking lessons and practicing to get better and better. Good luck!