Assuming the company PAYE/PRSI liability is less than 30K for the year, you can submit P30s on a quarterly basis. Return is due by 14th of month following quarter. So Jan - Mar return is due 14 April.
I think you're getting the company profit and salary a little confused. You should have a good idea of how much salary you can take from the company. If you decide to take 40K per year, you just work out the tax and PRSI applicable to that salary and pay it to Revenue on quarterly basis. Obviously if you are taking a different amount each quarter, you adjust your payments accordingly.
When the annual P35 is submitted and it works out that the company has overpaid tax and PRSI, this can be offset against other taxes or periods or refunded.