UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '2+/p4U/OGATFDVzRHhUtni7sX7yJqmBtOq/hZ0FNLLY=' 
WHERE 
  key_id = '8e11515fc96440e2cdc094a9e3c742ef0fd2131cd2e6157525074efe62cdbb54' 
  AND (
    token = '2+/p4U/OGATFDVzRHhUtni7sX7yJqmBtOq/hZ0FNLLY=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00029