UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'ObozF4/zkPVTrSAt/q8U2vYAb50SWcr2vfQm3N8gDag=' 
WHERE 
  key_id = '5ebc88a63de3d14dd2584618f0d780c02ffe5fe275ff0887d337f0587ae21356' 
  AND (
    token = 'ObozF4/zkPVTrSAt/q8U2vYAb50SWcr2vfQm3N8gDag=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00028