I've seen it happen before, as SATA ports aren't exactly very strong, and yes if you get it plugged back in with proper alignment it will work, but I wouldn't guarantee that bumping the system or cable won't cause the alignment to shift. I wouldn't consider using the broken port to be a long term solution. If you do happen to get the pins aligned, and port working, you might consider something like hot glue, to immobilize the cable end in such a fashion as to increase reliability and also allow you to remove the cable later.