If <24 hrs in BKK and you check-in landside, you will be asked for the tax because you have left the airport. Now if you can get your BP with your first flight (from the same flight that arrived in Thailand), perhaps you can avoid the tax as you already have your BP ??