UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '3Iqm25Ww3wSceZso9fjg3i1i2CIsyLLI3W8dZE4S4TU=' 
WHERE 
  key_id = '8a392d1a8650ad652f9fcff8b16267ef1db3e16f8ceb82f2689dc5728596052d' 
  AND (
    token = '3Iqm25Ww3wSceZso9fjg3i1i2CIsyLLI3W8dZE4S4TU=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00034