Whether or not making a 12:40 would work depends upon several situations when you arrive back at San Pedro. There can be delays clearing the ship, and delays at immigration once you're off the ship. We had a 12:15 flight out of LAX, and were off the ship by 9:15; however, we waited 45 minutes in the immigration line. We met our pre-arranged shuttle at 10:00, were at LAX by 10:30, and through security by 11:00. I understand that this is fairly normal, but I have heard reports of further delays. I'd stick with the 12:40 flight if that's what's available, and be sure to have travel insurance to cover delays (read the fine print to make sure it's covered).
ASunni1, hope all works out with the replacement licenses.