Can you run USBSerialConfigurationUtility.exe which is in the below path of USB Serial SDK and check if GPIO5 is listed in unused GPIOs section.
C:\Program Files (x86)\Cypress\USB-Serial SDK\bin
You can refer to C:\Program Files (x86)\Cypress\USB-Serial SDK\documentation\Cypress USB-Serial Configuration Utility User Guide.pdf to know where to find the unused GPIO section.
I bought a Cypress DVK board, configured it to I2C and SPI, set GPIO 5 to active 0 and tested it with code above. It did not succeed at the beginning, but then suddenly it works. Don't know why.
The GPIOs should be left unused (by the other SCBs) and should be configured as outputs using the USB-Serial configuration utility for the pins to work (drive high or low).