UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'yrTz2a+koJol7g0CmnGsfoyMGT0nj1jPpmbq84NPspg=' 
WHERE 
  key_id = 'd5f45910062d0012cd8cd4f8a03de96daa5384f476bd87f6fdff2e4ec983e0e3' 
  AND (
    token = 'yrTz2a+koJol7g0CmnGsfoyMGT0nj1jPpmbq84NPspg=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00028