Review order of conditions to optimize performance

If we do not need authorization, there is no need to perform a lookup (with an order_by) which could have a cost not negligible.