40 injured after attacks in Thailand