How to session-affinity using stick-tables with a defined timeout

I am using a table to store the IP from the client and using it to rate-limit, this works:

frontend test 
    tcp-request content track-sc0 req.hdr_ip(CF-Connecting-IP,-1) table st_per_ip_rates if HTTP HAS_CF_CONNECTING_IP
    tcp-request content track-sc0 req.hdr_ip(X-Forwarded-For,-1) table st_per_ip_rates if HTTP !HAS_CF_CONNECTING_IP HAS_X_FORWARDE    D_FOR
    tcp-request content track-sc0 src table st_per_ip_rates if HTTP !HAS_CF_CONNECTING_IP !HAS_X_FORWARDED_FOR

    http-request deny deny_status 429 if { sc_http_req_rate(0) gt 1800 }

 backend st_per_ip_rates
    stick-table type ip size 1m expire 3m store http_req_rate(1m)

But now I would like to do session-affinity on a backend so that all traffic can only be routed for 30 minutes to one host, similar to the balance source but how to do it using the IP stored in the table and only for a defined amount of time, wondering if is possible and how could I use stick on