It's definitely possible! But yes, I'll add to the above comments, that you must get on line early, because while the actual eating process while inside BOG is fairly quick and efficient, you are likely to spend that same amount of time on the outside waiting in line, just because of the glut of people who go there.
But once in there, you can be in an out, probably in around 20 minute-ish or so, give or take. Especially because you take care of the payment up front before you eat. You are served your food in lightning speed.
So, yeah, I think your estimate of wanting the whole process, from getting on line, to getting out, to be done is 40 minutes, is a reasonable expectation. And it's possible you're done with time to spare, even.