From memory you have to use the PS3 code ON the PS3. But since the PS3 service is now shutdown will it still let you login even? Probably not (why would it?)

All traces of the PS3 version (other than the PS3 to PS4 upgrade program) have been removed from the Mog Station so personally I'm guessing it won't let you register a new PS3 code (to either try to upgrade to PS4 or to get the free 30 days or both).

But I'm just guessing... if you can find a cheap copy and you're happy to possibly lose that money you could try though?