UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'wJxDV75nTBB0AqwPbZQw0pdO3EsAuzM5E8q0BheloLU=' 
WHERE 
  key_id = 'f2968804c58be03d627c0b559ec760f85147be0adbc41fdfc9c95232015c2344' 
  AND (
    token = 'wJxDV75nTBB0AqwPbZQw0pdO3EsAuzM5E8q0BheloLU=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00031