UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'Cus/hvhrCL/3cV60twc45QOcpkuVuoB5EAGy5hlFnyY=' 
WHERE 
  key_id = '006e1000924932bb3786ff58634d67b92be9688b4c104335dd2331c1fbf70264' 
  AND (
    token = 'Cus/hvhrCL/3cV60twc45QOcpkuVuoB5EAGy5hlFnyY=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00034