Are you a manual or automatic? In the manuals you can lift up the shifter boot and get to the cup holder from inside the console. If you do that, you should be able to push the back end of the cup holder back into position.
If you can't do that (don't know if the auto trans cars have that kind of access) then you will need to try and get the cup holder out completely. If the back is pressed in, see if you can (with the cup holder closed) push it in further and get the front part of the holder assembly to pop outwards. If you can, you can then finagle the holder assembly out of the console. Once it is out, it should slide easily back in place and lock in position as before.
This is, assuming, that your car isn't one of the later builds that has a screw securing it in place internally. Then I have no idea what you need to do as both my Skys have been very early built 2007 manuals where the first tip I listed works perfectly.