If you come to Koh lanta via krabi anyway I’d do the extension on the way here. Saves you a trip off the island (which can take most of day with the ferries and such.)
You can do the extension at any point with less than 30 days left on your current stamp.