While it was a trunk, it wasn't an access port. You added portfast after the fact, then added bpdu guard. BPDUGuard doesn't work unless the port is operationally in portfast mode (which isn't usually the case for a trunk). When you shut, no shut the port, it initially came up in portfast. It would lose its portfast status when it receives the first BPDU. But this time, BPDUGuard is enabled, so it would err-disable the port instead.
What kind of Access Point? Cisco?
These are some basic commands I have used for AP's (and then add qos).
switch(config) interface f0/1
switch(config-if)# switchport trunk encapsulation dot1q
switch(config-if)# switchport mode trunk
switch(config-if)# switchport trunk allowed vlan xxx, xx
switch(config-if)# spanning-tree portfast trunk
BUT, I have never applied bpduguard to an AP.
bpduguard is suppose to errdisable the port if it gets bpdus.