Is there any particular reason to use a key length of just 40 bits? Because it is vulnerable to brute-force attacks. To have a reasonable strength, the minimum reasonable key length nowadays is 128 bit (source).
If you don't care about this stuff, you may use one of the following: DES-40, RC2, RC5, Blowfish. These ciphers support a key length of 40 bits, as you require. Anyway, any of these ciphers always has block size different from 5 bytes, which you are probably interested into. I'm not aware of any cipher with a block size of 5-byte/40-bit.
The alternative would be to use a stream cipher that supports a key length of 40 bits, such as RC4 (you can find many more here).