Vegetables do go mouldy quite quickly in the warm temperatures of a tropical tank, so you need to take it out now. You should only leave it in for around twelve hours.
Put it in the morning and take it out in the evening for most fish, or put it in the evening and take it out in the morning, if you're feeding more nocturnal fish, like plecs.
Having said that, there's very little nutrition in cucumber; you'd be better off feeding courgette or lightly cooked and deshelled peas.