First off, you'll need 1,836,137 XP to get level 40. The most active way to earn this trophy is to complete all missions (which will count towards other trophies) and killing, or have a teammate kill, all enemies equal to or greater than your level.
Do not waste time reloading and replaying through certain parts of the game as progressing to Playthrough 2 will in all likelihood get you to unlocking this trophy quicker. Once playing through Playthrough 2, feel free to reload and play areas that have enemies that are no greater than 3 levels above you, as the difficulty to handle mobs will be too time consuming. As you progress, keep using the same strategy mentioned above and you this will be yours half-way through your Fyrstone Missions in Playthrough 2.
Some all-around tips to making this go faster are as follows:
Focus on improving gun proficiency for 2 weapons only. I recommend SMG and Revolver due to the fast reload and moderate damage of the SMG which can handle mobs, while the Revolver deals high amounts of damage, best used for strong enemies and bosses.
Keep on hand all types of elemental weapons. When combining this with the previous tip, you should have 5 different weapons for each weapon type you choose to have, keeping your backpack filled with at least 10 weapons. This will come more in handy than you realize, especially playing solo.
If you can manage to gather a decent boosting party, definitely play co-op as the experience gained will be much more.
Avoid dying by always having an exit to fall back to. If facing bosses, just keep running around while you heal. In either case, dying will be the biggest drawback to leveling quicker as you have to run back to where you were before progressing forward. And since enemies do not respawn, there is nothing to gain.
Feel free to comment with more tips!
Happy Hunting :)