I should add that you can't properly reseat the cable unless it is unlocked when you put it back. Look closely at the picture with closeup of it open and closed. It's a very small latch but it's very important.
Victor, there most definitely is a lock. The latch pivots up 90 degrees and then the cable slides out just as described. I have done this with several 3GS phones. I don't know what happened to yours, but you risk breaking your cable if you don't open the lock.