UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'wp6qC3Mt5Gs7na1fBtsDeG7DuI+ArOx+jc796gVtbh0=' 
WHERE 
  key_id = 'ab36a3c88d26471134c1fd6887778212a5279ef481d5c14c2f8a732909c2b75f' 
  AND (
    token = 'wp6qC3Mt5Gs7na1fBtsDeG7DuI+ArOx+jc796gVtbh0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00021