Static DHCP + HotSpot Problem ... any help?

Hi all
Good day,

kindly i have one issue need help with and below is the explanation:

i have RouterBoard 1100 AHX2 connected to a 24 mikrotik cloud switch (all ports bridged), with the ahx2 i create dhcp server for internal computers with leases based on computer MAC address and send ip from the dhcp1 server with ether4 with address (10.87.221.0/24)

and with ether5 i create a HotSpot for the guests with addresses (10.10.17.0/24).

both (ether4 and ether5) are connected to the 24 port switch which collect all the computers (wire, wireless, internal and guests).

what i want is when a computer or mobile device connected to the network, the router search for the MAC address if it is in the leases then it is internal, send it IP from DHCP1 server.
if it is not in the leases, then it is a guest, send it IP from DHCP2 server (HotSpot).

note: all MAC address are added in the leases.

any help with this issue please?