Table schema: CREATE TABLE `my_table` ( `field1` int unsigned NOT NULL, `field2` bigint unsigned NOT NULL DEFAULT '0', `field3` int unsigned NOT NULL DEFAULT '0', `field4` int unsigned NOT NULL DEFAULT '0', `field5` char(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '', `field6` char(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '', `field7` int unsigned NOT NULL DEFAULT '0', `field8` enum('0','1','2') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '0', `field9` char(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `field10` int unsigned NOT NULL DEFAULT '0', `field11` bigint unsigned DEFAULT NULL, `my_json` json DEFAULT NULL, PRIMARY KEY (`field7`,`field1`) USING BTREE, KEY `myindex5` (`field2`) USING BTREE, KEY `myindex4` (`field6`,`field5`) USING BTREE, KEY `myindex3` (`field7`,`field3`,`field8`) USING BTREE, KEY `field11` (`field11`), KEY `myindex1` ((cast(json_extract(`my_json`,_utf8mb4'$.my_json_key1') as char(40) array))), KEY `myindex2` ((cast(json_extract(`my_json`,_utf8mb4'$.my_json_key2') as char(40) array))) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci select field1, field4, field3 from my_table use index (myindex5) where field2=51556516612 and field7=130 and field3>1642517609.6286993 ORDER BY field4 DESC LIMIT 1 update my_table set field3=GREATEST(1642521268,field3), field4=1642520377, field2=51556516612, field8=field8, field6='999a9aa9999a', field5='tesu', field11='75103640973835', field9='Flores Amarelas (Rosas, 2002.12.1) | AB', my_json='{"my_json_key1": ["Ro"], "my_json_key2": ["Tulipas", "Dahlia"]}' where field1=167900249 and field7=130 select field3, field4 from my_table where field1=167900249 and field7=130 and field2=51556516612 update my_table set field3=GREATEST(1642521808,field3), field4=1642999999, field8='2', field11='75103640973835', field9='Flores Amarelas (Rosas, 2002.12.1) | AB', my_json='{"my_json_key1": ["Ro"], "my_json_key2": ["Tulipas", "Dahlia"]}' where field1=167900249 and field7=130