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

Query time 0.00036