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

Query time 0.00024